// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
const apiPrefix = '/web';

/** Device Tree GET /v1/device */
export async function deviceTreeControllerDeviceTree(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deviceTreeControllerDeviceTreeParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultDeviceTreeVO>(`${apiPrefix}/v1/device`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 电池堆树列表查询 GET /v1/device/bms */
export async function deviceTreeControllerBmsWithBoxTree(options?: { [key: string]: any }) {
  return request<API.ApiResultListDeviceTreeVO>(`${apiPrefix}/v1/device/bms`, {
    method: 'GET',
    ...(options || {}),
  });
}

/** Offline statistics GET /v1/device/offline-statistics */
export async function deviceTreeControllerOfflineStatistics(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deviceTreeControllerOfflineStatisticsParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultInteger>(`${apiPrefix}/v1/device/offline-statistics`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
